<template>
  <router-view/>
</template>
<script>
import Config from '@myconfig/config.min.js'
export default {
  mounted() {
    console.log('app mounted')
    this.$http.get(Config.baseUrl + '/api/user/now').then(function(rsp){
      console.log(rsp)
      if(rsp.data.code == 1){
        this.$store.commit('setUser',rsp.data.data)
      }else{
        this.$message({massage:rsp.data.data})
        setTimeout(function(){
          // todo:修改后恢复自动跳转
            window.location= 'http://www.laiyintools.com/web/login'
        },1500)
      }
    },function(error){
      console.log(error)
    })
  },
}
</script>

